package org.serverct.finalfight.game.hadesgame.events;

import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import org.bukkit.util.Vector;
import org.serverct.finalfight.game.hadesgame.EventType;
import org.serverct.finalfight.internal.game.basic.BasicGame;
import org.serverct.finalfight.internal.game.hadesgame.InstantEvent;

import java.util.UUID;

public class SkyTracker extends InstantEvent {

    public SkyTracker(BasicGame game, EventType type) {
        super(game, type);
    }

    @Override
    public void execute() {
        for (UUID uuid : this.game.players.keySet()) {
            Player player = Bukkit.getPlayer(uuid);
            if (!this.game.isAlive(player)) {
                continue;
            }
            player.setVelocity(new Vector(0, 25, 0));
        }
    }
}
